/**
 * 
 */
package wangjg.xuexiban.util;

import java.util.Locale;

import wangjg.xuexiban.MyApplication;
import android.content.SharedPreferences;
import android.os.Build;
import android.preference.PreferenceManager;

/**
 * @author wangjg
 *
 */
public class Env {
	
	public static String getDataRoot(){
		SharedPreferences setting = PreferenceManager.getDefaultSharedPreferences(MyApplication.getInstance());
		String root = setting.getString(Constant.KEY_DATA_DIR, Constant.DEFAULT_DATA_ROOT);
		return root;
	}

	public static boolean isEmulator() {
		String model = Build.MODEL.toLowerCase(Locale.getDefault());
		return (model.equals("sdk")) || (model.equals("google_sdk") || model.equals("android sdk built for x86"));
	}

}
